<template>
  <div class="ClassificationList">
    <div v-for="(item, index) in content.cls" :key="index">
      <p>{{ item.name }}</p>
      <ul>
        <li v-for="(item, index) in item.thrCls" :key="index">
          <router-link
            :to="{path: '/ProductList', query: {id:item.categoryId}}"
            tag="a"
            :categoryId="item.categoryId"
          >
            <img :src="item.pic" alt />
            {{ item.name }}
          </router-link>
        </li>
      </ul>
    </div>
  </div>
</template>
<script>
export default {
  name: "ClassificationList",
  props: ["content"]
};
</script>
<style scoped>
.ClassificationList {
  height: 100%;
  width: calc(100% - 1.8rem);
  overflow: auto;
}

.ClassificationList p {
  height: 0.8rem;
  line-height: 0.8rem;
  font-size: 0.32rem;
  color: #333;
  padding: 0 0.1rem;
  text-overflow: ellipsis;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  text-align: center;
  background: #eee;
}

.ClassificationList ul {
  overflow: hidden;
}

.ClassificationList ul li {
  float: left;
  width: 33.33333%;
}

.ClassificationList ul li a {
  display: block;
  font-size: 0.24rem;
  background-color: #fff;
  margin: 0 0.06rem 0.1rem;
  text-align: center;
  padding: 0.2rem 0.1rem;
  color: #333;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.ClassificationList ul li a img {
  width: 1.1rem;
  padding: 0 0 0.2rem;
  display: block;
  margin: 0 auto;
  min-height: 0.94rem;
}
</style>